$Msg
= GetMessage([DeviceId])
Fetches
a string from the message queue of the specified device.
Parameters
[DeviceId]
The
device from which the message is extracted.
Return Value
Returns
a null string if message queue is empty, or returns the next
available string.
Remarks
- Every thread maintains a message queue, into which we can put or get message from, for the purpose of inter-thread communication.
- If no device is specified, then the current device is
assumed.
- If
the specified device does not exist, the system would jump onto
ONSYSTEMERROR.
Example
$Msg = GetMessage()
$Msg will contain a string from the message queue
of the current device, if any.
$Msg = GetMessage(10)
$Msg will contain a string from the message queue
of device 10, if any.